home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: free
- Date: Sat, 27 Jan 96 00:21:50 GMT
- Organization: none
- Distribution: world
- Message-ID: <822702110snz@genesis.demon.co.uk>
- References: <4e908i$3vq@news.utdallas.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4e908i$3vq@news.utdallas.edu>
- $USER@utdallas.edu "Robert B Szerbiak" writes:
-
- >Keywords:
- >
- >Can anyone tell me how to fine the length of an array deallocated with a call
- > to free.
- >I tried looking at using the pointer in sizeof but it only returns the size of
- > the
- >pointer. Thanks.
-
- If it is deallocated it has no length! :-)
-
- C doesn't provide any method of determining the size of a heap allocated
- object - you simply have to note the size somewhere when you allocate it.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-